Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse-string: encourage grapheme awareness #261

Merged
merged 1 commit into from
Sep 29, 2020
Merged

Conversation

cmcaine
Copy link
Contributor

@cmcaine cmcaine commented Sep 28, 2020

Closes #238. I've put in a compulsory unicode test with an emoji and
left the grapheme tests optional for now because they're a bit fiddlier
to get right.


You will probably find the `Unicode` stdlib useful for this bonus task.

To enable the graphemes test, add `const TEST_GRAPHEMES = true` to the global scope of your file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish Julia had a nicer way of handling this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's much that can be done. Test or build suites in other languages would read a DEFINE or config files or environment variables. We want the student to only have to modify the one file and we want mentors to run the same tests the students are running, so we probably don't want a config file or env variables.

We could define a function in runtests and give the students an API like

enable_bonus_test(:graphemes)

or something?

That would require some changes to our repo-level runtests because that includes the files in a different order.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think how you did it works fine, it would just be nice if Julia had a nice way to run specific testsets. (there's an issue open for that I think)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests to reverse-string to teach correct string handling
2 participants